<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
    <script src="../js/jquery-3.6.3.min.js.txt"></script>
    <script>
        $(function () {
            $("select[name=type]").val('${stu.type}');
        });
    </script>
</head>
<body>

<form action="?" method="post">
    <div>
        <label hidden>编号:</label>
        <input type="number" name="id" value="${stu.id}" hidden>
    </div>
    <div>
        <label>姓名:</label>
        <input type="text" name="sname" value="${stu.sname}" >
    </div>
    <div>
        <label>毕业学校:</label>
        <input type="text" name="school" value="${stu.school}">
    </div>
    <div>
        <label>毕业专业:</label>
        <input type="text" name="major" value="${stu.major}">
    </div>
    <div>
        <label>学业等级:</label>
        <select name="type">
            <option value="专科">专科</option>
            <option value="本科">本科</option>
            <option value="高职">高职</option>
        </select>
    </div>
    <div>
        <label>在读状态:</label>
        <input type="radio" name="isgraduate" value="true" ${stu.isgraduate == 'true' ? 'checked' : ''}/>在读
        <input type="radio" name="isgraduate" value="false" ${stu.isgraduate == 'false' ? 'checked' : ''}/>毕业
    </div>
    <div>
        <label>注册时间:</label>
        <input type="text" name="addtime" value='<fmt:formatDate value="${stu.addtime}" pattern="yyyy/MM/dd"/>'>
    </div>
    <div>
        <label>微信:</label>
        <input type="text" name="openid" value="${stu.openid}">
    </div>
    <div>
        <label>电话号码:</label>
        <input type="text" name="phone" value="${stu.phone}">
    </div>
    <div>
        <label>性别:</label>
        <input type="radio" name="sex" value="男" ${stu.sex == '男' ? 'checked' : ''}/>男
        <input type="radio" name="sex" value="女" ${stu.sex == '女' ? 'checked' : ''}/>女
    </div>
    <div>
        <input type="submit" value="修改">
    </div>
</form>
</body>
</html>
